import express from 'express';
import * as favoritesController from './favorites.controller';
import { authGuard } from '../auth/auth.middleware';

const router = express.Router();

/**
 * 获取内容
 */
router.post('/getFavorites', authGuard, favoritesController.index);
// router.post('/getFavorites', favoritesController.index);

/**
 * 创建内容
 */
router.post('/favorites', authGuard, favoritesController.store);
// router.post('/favorites', favoritesController.store);

/**
 * 创建预览内容
 */
router.post('/preview', favoritesController.preview);

/**
 * 删除内容
 */
router.post('/favoritesDestroy', authGuard, favoritesController.destroy)

/**
 * 导出路由
 */
export default router;